package com.moteur.analysersite.util;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class DocumentJsoup {
	private String url;
	private Document doc;
	private TimeOut timeOutSecond;
	
	public DocumentJsoup() {
		super();
	}

	public DocumentJsoup(String url) {
		super();
		this.url = url;
		this.timeOutSecond = TimeOut.getInstance();
		try {
			this.doc = Jsoup.connect(url).timeout(timeOutSecond.getTimeout() * 1000).get();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}

	public Document getDoc() {
		return doc;
	}

	public void setDoc(Document doc) {
		this.doc = doc;
	}

	public TimeOut getTimeOutSecond() {
		return timeOutSecond;
	}

	public void setTimeOutSecond(TimeOut timeOutSecond) {
		this.timeOutSecond = timeOutSecond;
	}
}
